package com.skywolf.chem.common.enums;

import com.skywolf.chem.common.sysconfig.response.IResponseCode;
import lombok.Getter;
import lombok.ToString;


@Getter
@ToString
public enum ResponseCodeEnum implements IResponseCode {

    SYSTEM_ERROR(100500, "系统错误"),
    PARAM_ERROR(100501, "参数错误"),
    UNAUTHORIZED(100401, "未授权"),
    INVALID_TOKEN(100403, "认证失败"),
    HEADER_TOKEN(100404, "请求header错误"),

    USER_DUPLICATE(200001, "用户已存在"),
    USER_NOT_FOUND(200002, "用户不存在"),
    USER_INVALID_USERNAME_PASSWORD(200003, "用户名或密码错误"),
    USER_FORBIDDEN(200004, "用户已被禁用"),
    USER_INVALID_OLD_PASSWORD(200005, "旧密码错误"),
    ROLE_DUPLICATE(201001, "角色已存在"),
    ROLE_NOT_FOUND(201001, "角色不存在"),

    PRODUCT_NOT_FOUNT(300001, "产品不存在"),
    PRODUCT_IMAGE_NOT_NULL(300002, "产品图片不能为空"),
    PRODUCT_IMAGE_NOT_FOUNT(300003, "产品图片不存在"),

    NEWS_NOT_FOUNT(400001, "新闻不存在"),

    RECRUITMENT_NOT_FOUNT(500001, "招聘信息不存在"),

    IMAGE_NOT_NULL(600002, "上传图片不能为空"),




    FASTDFS_ERROR(900001, "文件系统异常"),
    PHONE_ERROR(900002, "手机号错误"),
    PHONE_DUPLICATE(900003, "手机号已注册"),
    CODE_EXPIRE(900004, "验证码已过期"),
    CODE_ERROR(900005, "验证码错误"),
    COMMENT_ERROR(900006, "请选择要评论的帖子"),
    COMMENT_long_ERROR(900007, "评论内容过长或为空"),
    COLUMNS_ERROR(900008, "栏目已经存在"),
    COLUMNS_ARTICLE_ERROR(900009, "栏目下存在帖子，不允许删除"),
    COLUMNS_NO_ERROR(900010, "所选栏目不存在"),
    SENDMSG_ERROR(900011, "短信服务异常!"),
    IMG_ERROR(900012, "封面图最多三张!"),
    PHONE_BIND(900013, "手机号已绑定"),
    OLD_PHONE_ERROR(900014, "原手机号错误"),
    OLD_PHONE_CHECK_ERROR(900015, "请先验证原手机"),
    PUSH_CONFIG_ERROR(900016, "push的appkey,Secret异常"),
    PUSH_MSG_ERROR(9000123, "push失败"),
    RIDING_ERROR(900024, "已经报过名了"),
    RIDING_NO_ERROR(900017, "该用户还未报名"),
    CARD_ERROR(900018, "请填写正确的身份证号"),
    AGE_ERROR(900019, "1965年-2002年之间出身才可参与活动!"),
    WECHATLOGIN_ERROR(900020, "微信登录异常"),
    WECHATLOGIN_TOKEN_ERROR(900021, "微信登录token异常"),
    WECHATLOGIN_FAIL_ERROR(900022, "微信登录失败"),

    GROUP_NOT_EXIST(900050,"组别不存在！");
    ResponseCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 机读响应码
     */
    private Integer code;

    /**
     * 认读响应信息
     */
    private String message;

}
